#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStringList>
#include <QFileInfoList>
#include <QPixmap>
#include <QWheelEvent>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void wheelEvent(QWheelEvent *event);

    void resizeEvent(QResizeEvent *);

    void drawPic();


private slots:
    void on_nextBtn_clicked();

    void on_prevBtn_clicked();

    void on_actionDir_triggered();

private:
    Ui::MainWindow *ui;

    QStringList allow = {"*.jpg", "*.png", "*.jpeg"};
    QFileInfoList fileList;
    int index = 0;

    // 图片属性
    QPixmap pix;
    int w = 0;
    int h = 0;
};

#endif // MAINWINDOW_H
